home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / include / x11 / xlibint.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-11  |  20.2 KB  |  749 lines

  1. /* $XConsortium: Xlibint.h,v 11.91 91/07/22 15:43:08 rws Exp $ */
  2. /* Copyright 1984, 1985, 1987, 1989  Massachusetts Institute of Technology */
  3.  
  4. /*
  5. Permission to use, copy, modify, distribute, and sell this software and its
  6. documentation for any purpose is hereby granted without fee, provided that
  7. the above copyright notice appear in all copies and that both that
  8. copyright notice and this permission notice appear in supporting
  9. documentation, and that the name of M.I.T. not be used in advertising or
  10. publicity pertaining to distribution of the software without specific,
  11. written prior permission.  M.I.T. makes no representations about the
  12. suitability of this software for any purpose.  It is provided "as is"
  13. without express or implied warranty.
  14. */
  15.  
  16. /*
  17.  *    XlibInternal.h - Header definition and support file for the internal
  18.  *    support routines (XlibInternal) used by the C subroutine interface
  19.  *    library (Xlib) to the X Window System.
  20.  *
  21.  *    Warning, there be dragons here....
  22.  */
  23.  
  24. #ifdef MSDOS
  25. #include <stdlib.h>
  26. #include <malloc.h>
  27. #endif
  28.  
  29. #ifndef NEED_EVENTS
  30. #define _XEVENT_
  31. #endif
  32.  
  33. #include <X11/Xlib.h>
  34.  
  35. /*
  36.  * define the following if you want the Data macro to be a procedure instead
  37.  */
  38. #ifdef CRAY
  39. #define DataRoutineIsProcedure
  40. #endif /* CRAY */
  41.  
  42. #ifndef _XEVENT_
  43. /*
  44.  * _QEvent datatype for use in input queueing.
  45.  */
  46. typedef struct _XSQEvent {
  47.     struct _XSQEvent *next;
  48.     XEvent event;
  49. } _XQEvent;
  50. #endif
  51.  
  52. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  53. #define NEED_EVENTS
  54. #endif
  55. #include <X11/Xproto.h>
  56. #include <errno.h>
  57.  
  58. /* check for previous definition of _XBCOPYFUNC - DMD 06/02/94 */
  59.  
  60. #ifdef __WATCOMC__
  61. #ifndef _XBCOPYFUNC
  62. #define _XBCOPYFUNC _Xbcopy
  63. #endif
  64. #else
  65. #define _XBCOPYFUNC _Xbcopy
  66. #endif
  67.  
  68. #include <X11/Xfuncs.h>
  69. #include <X11/Xosdefs.h>
  70.  
  71. /* Utek leaves kernel macros around in include files (bleah) */
  72. #ifdef dirty
  73. #undef dirty
  74. #endif
  75.  
  76. #ifdef CRAY
  77. #define WORD64
  78. #endif
  79.  
  80. #ifndef X_NOT_STDC_ENV
  81. #include <stdlib.h>
  82. #include <string.h>
  83. #else
  84. char *malloc(), *realloc(), *calloc();
  85. void exit();
  86. #ifdef SYSV
  87. #include <string.h>
  88. #else
  89. #include <strings.h>
  90. #endif
  91. #endif
  92. #if defined(macII) && !defined(__STDC__)  /* stdlib.h fails to define these */
  93. char *malloc(), *realloc(), *calloc();
  94. #endif /* macII */
  95.  
  96. /*
  97.  * The following definitions can be used for locking requests in multi-threaded
  98.  * address spaces.
  99.  */
  100. #define LockDisplay(dis)
  101. #define LockMutex(mutex)
  102. #define UnlockMutex(mutex)
  103. #define UnlockDisplay(dis)
  104. #define Xfree(ptr) free((ptr))
  105.  
  106. /*
  107.  * Note that some machines do not return a valid pointer for malloc(0), in
  108.  * which case we provide an alternate under the control of the
  109.  * define MALLOC_0_RETURNS_NULL.  This is necessary because some
  110.  * Xlib code expects malloc(0) to return a valid pointer to storage.
  111.  */
  112. #ifdef MALLOC_0_RETURNS_NULL
  113.  
  114. # define Xmalloc(size) malloc(((size) > 0 ? (size) : 1))
  115. # define Xrealloc(ptr, size) realloc((ptr), ((size) > 0 ? (size) : 1))
  116. # define Xcalloc(nelem, elsize) calloc(((nelem) > 0 ? (nelem) : 1), (elsize))
  117.  
  118. #else
  119.  
  120. # define Xmalloc(size) malloc((size))
  121. # define Xrealloc(ptr, size) realloc((ptr), (size))
  122. # define Xcalloc(nelem, elsize) calloc((nelem), (elsize))
  123.  
  124. #endif
  125.  
  126. #ifndef NULL
  127. #define NULL 0
  128. #endif
  129. #define LOCKED 1
  130. #define UNLOCKED 0
  131.  
  132. #ifndef __WATCOMC__
  133. extern int errno;            /* Internal system error number. */
  134. #endif
  135.  
  136. #ifndef BUFSIZE
  137. #define BUFSIZE 2048            /* X output buffer size. */
  138. #endif
  139. #ifndef PTSPERBATCH
  140. #define PTSPERBATCH 1024        /* point batching */
  141. #endif
  142. #ifndef WLNSPERBATCH
  143. #define WLNSPERBATCH 50            /* wide line batching */
  144. #endif
  145. #ifndef ZLNSPERBATCH
  146. #define ZLNSPERBATCH 1024        /* thin line batching */
  147. #endif
  148. #ifndef WRCTSPERBATCH
  149. #define WRCTSPERBATCH 10        /* wide line rectangle batching */
  150. #endif
  151. #ifndef ZRCTSPERBATCH
  152. #define ZRCTSPERBATCH 256        /* thin line rectangle batching */
  153. #endif
  154. #ifndef FRCTSPERBATCH
  155. #define FRCTSPERBATCH 256        /* filled rectangle batching */
  156. #endif
  157. #ifndef FARCSPERBATCH
  158. #define FARCSPERBATCH 256        /* filled arc batching */
  159. #endif
  160. #ifndef CURSORFONT
  161. #define CURSORFONT "cursor"        /* standard cursor fonts */
  162. #endif
  163.  
  164. /*
  165.  * display flags
  166.  */
  167. #define XlibDisplayIOError    (1L << 0)
  168. #define XlibDisplayClosing    (1L << 1)
  169.  
  170. /*
  171.  * X Protocol packetizing macros.
  172.  */
  173.  
  174. /*   Need to start requests on 64 bit word boundries
  175.  *   on a CRAY computer so add a NoOp (127) if needed.
  176.  *   A character pointer on a CRAY computer will be non-zero
  177.  *   after shifting right 61 bits of it is not pointing to
  178.  *   a word boundary.
  179.  */
  180. #ifdef WORD64
  181. #define WORD64ALIGN if ((long)dpy->bufptr >> 61) {\
  182.            dpy->last_req = dpy->bufptr;\
  183.            *(dpy->bufptr)   = X_NoOperation;\
  184.            *(dpy->bufptr+1) =  0;\
  185.            *(dpy->bufptr+2) =  0;\
  186.            *(dpy->bufptr+3) =  1;\
  187.              dpy->request += 1;\
  188.              dpy->bufptr += 4;\
  189.          }
  190. #else /* else does not require alignment on 64-bit boundaries */
  191. #define WORD64ALIGN
  192. #endif /* WORD64 */
  193.  
  194.  
  195. /*
  196.  * GetReq - Get the next avilable X request packet in the buffer and
  197.  * return it. 
  198.  *
  199.  * "name" is the name of the request, e.g. CreatePixmap, OpenFont, etc.
  200.  * "req" is the name of the request pointer.
  201.  *
  202.  */
  203.  
  204. #if __STDC__ && !defined(UNIXCPP)
  205. #define GetReq(name, req) \
  206.         WORD64ALIGN\
  207.     if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
  208.         _XFlush(dpy);\
  209.     req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
  210.     req->reqType = X_##name;\
  211.     req->length = (SIZEOF(x##name##Req))>>2;\
  212.     dpy->bufptr += SIZEOF(x##name##Req);\
  213.     dpy->request++
  214.  
  215. #else  /* non-ANSI C uses empty comment instead of "##" for token concatenation */
  216. #define GetReq(name, req) \
  217.         WORD64ALIGN\
  218.     if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
  219.         _XFlush(dpy);\
  220.     req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
  221.     req->reqType = X_/**/name;\
  222.     req->length = (SIZEOF(x/**/name/**/Req))>>2;\
  223.     dpy->bufptr += SIZEOF(x/**/name/**/Req);\
  224.     dpy->request++
  225. #endif
  226.  
  227. /* GetReqExtra is the same as GetReq, but allocates "n" additional
  228.    bytes after the request. "n" must be a multiple of 4!  */
  229.  
  230. #if __STDC__ && !defined(UNIXCPP)
  231. #define GetReqExtra(name, n, req) \
  232.         WORD64ALIGN\
  233.     if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\
  234.         _XFlush(dpy);\
  235.     req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
  236.     req->reqType = X_##name;\
  237.     req->length = (SIZEOF(x##name##Req) + n)>>2;\
  238.     dpy->bufptr += SIZEOF(x##name##Req) + n;\
  239.     dpy->request++
  240. #else
  241. #define GetReqExtra(name, n, req) \
  242.         WORD64ALIGN\
  243.     if ((dpy->bufptr + SIZEOF(x/**/name/**/Req) + n) > dpy->bufmax)\
  244.         _XFlush(dpy);\
  245.     req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
  246.     req->reqType = X_/**/name;\
  247.     req->length = (SIZEOF(x/**/name/**/Req) + n)>>2;\
  248.     dpy->bufptr += SIZEOF(x/**/name/**/Req) + n;\
  249.     dpy->request++
  250. #endif
  251.  
  252.  
  253. /*
  254.  * GetResReq is for those requests that have a resource ID 
  255.  * (Window, Pixmap, GContext, etc.) as their single argument.
  256.  * "rid" is the name of the resource. 
  257.  */
  258.  
  259. #if __STDC__ && !defined(UNIXCPP)
  260. #define GetResReq(name, rid, req) \
  261.         WORD64ALIGN\
  262.     if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
  263.         _XFlush(dpy);\
  264.     req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
  265.     req->reqType = X_##name;\
  266.     req->length = 2;\
  267.     req->id = (rid);\
  268.     dpy->bufptr += SIZEOF(xResourceReq);\
  269.     dpy->request++
  270. #else
  271. #define GetResReq(name, rid, req) \
  272.         WORD64ALIGN\
  273.     if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
  274.         _XFlush(dpy);\
  275.     req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
  276.     req->reqType = X_/**/name;\
  277.     req->length = 2;\
  278.     req->id = (rid);\
  279.     dpy->bufptr += SIZEOF(xResourceReq);\
  280.     dpy->request++
  281. #endif
  282.  
  283. /*
  284.  * GetEmptyReq is for those requests that have no arguments
  285.  * at all. 
  286.  */
  287. #if __STDC__ && !defined(UNIXCPP)
  288. #define GetEmptyReq(name, req) \
  289.         WORD64ALIGN\
  290.     if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
  291.         _XFlush(dpy);\
  292.     req = (xReq *) (dpy->last_req = dpy->bufptr);\
  293.     req->reqType = X_##name;\
  294.     req->length = 1;\
  295.     dpy->bufptr += SIZEOF(xReq);\
  296.     dpy->request++
  297. #else
  298. #define GetEmptyReq(name, req) \
  299.         WORD64ALIGN\
  300.     if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
  301.         _XFlush(dpy);\
  302.     req = (xReq *) (dpy->last_req = dpy->bufptr);\
  303.     req->reqType = X_/**/name;\
  304.     req->length = 1;\
  305.     dpy->bufptr += SIZEOF(xReq);\
  306.     dpy->request++
  307. #endif
  308.  
  309.  
  310. #define SyncHandle() \
  311.     if (dpy->synchandler) (*dpy->synchandler)(dpy)
  312.  
  313. #define FlushGC(dpy, gc) \
  314.     if ((gc)->dirty) _XFlushGCCache((dpy), (gc))
  315. /*
  316.  * Data - Place data in the buffer and pad the end to provide
  317.  * 32 bit word alignment.  Transmit if the buffer fills.
  318.  *
  319.  * "dpy" is a pointer to a Display.
  320.  * "data" is a pinter to a data buffer.
  321.  * "len" is the length of the data buffer.
  322.  * we can presume buffer less than 2^16 bytes, so bcopy can be used safely.
  323.  */
  324. #ifndef DataRoutineIsProcedure
  325. #define Data(dpy, data, len) \
  326.     if (dpy->bufptr + (len) <= dpy->bufmax) {\
  327.         bcopy(data, dpy->bufptr, (int)len);\
  328.         dpy->bufptr += ((len) + 3) & ~3;\
  329.     } else\
  330.         _XSend(dpy, data, len)
  331. #endif /* DataRoutineIsProcedure */
  332.  
  333.  
  334. /* Allocate bytes from the buffer.  No padding is done, so if
  335.  * the length is not a multiple of 4, the caller must be
  336.  * careful to leave the buffer aligned after sending the
  337.  * current request.
  338.  *
  339.  * "type" is the type of the pointer being assigned to.
  340.  * "ptr" is the pointer being assigned to.
  341.  * "n" is the number of bytes to allocate.
  342.  *
  343.  * Example: 
  344.  *    xTextElt *elt;
  345.  *    BufAlloc (xTextElt *, elt, nbytes)
  346.  */
  347.  
  348. #define BufAlloc(type, ptr, n) \
  349.     if (dpy->bufptr + (n) > dpy->bufmax) \
  350.         _XFlush (dpy); \
  351.     ptr = (type) dpy->bufptr; \
  352.     dpy->bufptr += (n);
  353.  
  354. /*
  355.  * provide emulation routines for smaller architectures
  356.  */
  357. #ifndef WORD64
  358. #define Data16(dpy, data, len) Data((dpy), (char *)(data), (len))
  359. #define Data32(dpy, data, len) Data((dpy), (char *)(data), (len))
  360. #define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
  361. #define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
  362. #define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
  363. #endif /* not WORD64 */
  364.  
  365. #define PackData16(dpy,data,len) Data16 (dpy, data, len)
  366. #define PackData32(dpy,data,len) Data32 (dpy, data, len)
  367.  
  368. /* Xlib manual is bogus */
  369. #define PackData(dpy,data,len) PackData16 (dpy, data, len)
  370.  
  371. #define min(a,b) (((a) < (b)) ? (a) : (b))
  372. #define max(a,b) (((a) > (b)) ? (a) : (b))
  373.  
  374. #define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \
  375.                  (((cs)->rbearing|(cs)->lbearing| \
  376.                    (cs)->ascent|(cs)->descent) == 0))
  377.  
  378. /* 
  379.  * CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit
  380.  * character.  If the character is in the column and exists, then return the
  381.  * appropriate metrics (note that fonts with common per-character metrics will
  382.  * return min_bounds).  If none of these hold true, try again with the default
  383.  * char.
  384.  */
  385. #define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \
  386. { \
  387.     cs = def; \
  388.     if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
  389.     if (fs->per_char == NULL) { \
  390.         cs = &fs->min_bounds; \
  391.     } else { \
  392.         cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \
  393.         if (CI_NONEXISTCHAR(cs)) cs = def; \
  394.     } \
  395.     } \
  396. }
  397.  
  398. #define CI_GET_DEFAULT_INFO_1D(fs,cs) \
  399.   CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs)
  400.  
  401.  
  402.  
  403. /*
  404.  * CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and 
  405.  * column.  This is used for fonts that have more than row zero.
  406.  */
  407. #define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \
  408. { \
  409.     cs = def; \
  410.     if (row >= fs->min_byte1 && row <= fs->max_byte1 && \
  411.     col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
  412.     if (fs->per_char == NULL) { \
  413.         cs = &fs->min_bounds; \
  414.     } else { \
  415.         cs = &fs->per_char[((row - fs->min_byte1) * \
  416.                     (fs->max_char_or_byte2 - \
  417.                  fs->min_char_or_byte2 + 1)) + \
  418.                    (col - fs->min_char_or_byte2)]; \
  419.         if (CI_NONEXISTCHAR(cs)) cs = def; \
  420.         } \
  421.     } \
  422. }
  423.  
  424. #define CI_GET_DEFAULT_INFO_2D(fs,cs) \
  425. { \
  426.     unsigned int r = (fs->default_char >> 8); \
  427.     unsigned int c = (fs->default_char & 0xff); \
  428.     CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \
  429. }
  430.  
  431.  
  432.  
  433.  
  434.  
  435. #ifdef MUSTCOPY
  436.  
  437. /* a little bit of magic */
  438. #define OneDataCard32(dpy,dstaddr,srcvar) \
  439.   { dpy->bufptr -= 4; Data32 (dpy, (char *) &(srcvar), 4); }
  440.  
  441. #define STARTITERATE(tpvar,type,start,endcond,decr) \
  442.   { register char *cpvar; \
  443.   for (cpvar = (char *) start; endcond; cpvar = NEXTPTR(cpvar,type), decr) { \
  444.     type dummy; bcopy (cpvar, (char *) &dummy, SIZEOF(type)); \
  445.     tpvar = (type *) cpvar;
  446. #define ENDITERATE }}
  447.  
  448. #else
  449.  
  450. /* srcvar must be a variable for large architecture version */
  451. #define OneDataCard32(dpy,dstaddr,srcvar) \
  452.   { *(unsigned long *)(dstaddr) = (srcvar); }
  453.  
  454. #define STARTITERATE(tpvar,type,start,endcond,decr) \
  455.   for (tpvar = (type *) start; endcond; tpvar++, decr) {
  456. #define ENDITERATE }
  457.  
  458. #endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
  459.  
  460. /*
  461.  * This structure is private to the library.
  462.  */
  463. typedef struct _XFreeFuncs {
  464.     void (*atoms)();        /* _XFreeAtomTable */
  465.     int (*modifiermap)();    /* XFreeModifierMap */
  466.     void (*key_bindings)();    /* _XFreeKeyBindings */
  467.     void (*context_db)();    /* _XFreeContextDB */
  468.     void (*defaultCCCs)();    /* _XcmsFreeDefaultCCCs */
  469.     void (*clientCmaps)();    /* _XcmsFreeClientCmaps */
  470.     void (*intensityMaps)();    /* _XcmsFreeIntensityMaps */
  471.     void (*im_filters)();    /* _XFreeIMFilters */
  472. } _XFreeFuncRec;
  473.  
  474. /*
  475.  * This structure is private to the library.
  476.  */
  477. typedef struct _XExten {    /* private to extension mechanism */
  478.     struct _XExten *next;    /* next in list */
  479.     XExtCodes codes;    /* public information, all extension told */
  480.     int (*create_GC)();    /* routine to call when GC created */
  481.     int (*copy_GC)();    /* routine to call when GC copied */
  482.     int (*flush_GC)();    /* routine to call when GC flushed */
  483.     int (*free_GC)();    /* routine to call when GC freed */
  484.     int (*create_Font)();    /* routine to call when Font created */
  485.     int (*free_Font)();    /* routine to call when Font freed */
  486.     int (*close_display)();    /* routine to call when connection closed */
  487.     int (*error)();        /* who to call when an error occurs */
  488.         char *(*error_string)();  /* routine to supply error string */
  489.     char *name;        /* name of this extension */
  490.     void (*error_values)(); /* routine to supply error values */
  491. } _XExtension;
  492.  
  493.  
  494. /* extension hooks */
  495.  
  496. _XFUNCPROTOBEGIN
  497.  
  498. #ifdef DataRoutineIsProcedure
  499. extern void Data();
  500. #endif
  501. extern int _XError();            /* prepare to upcall user handler */
  502. extern int _XIOError();            /* prepare to upcall user handler */
  503. extern int (*_XIOErrorFunction)();    /* X system error reporting routine. */
  504. extern int (*_XErrorFunction)();    /* X_Error event reporting routine. */
  505. extern void _XEatData();        /* swallow data from server */
  506. extern char *_XAllocScratch();        /* fast memory allocator */
  507. extern Visual *_XVIDtoVisual();        /* given visual id, find structure */
  508. extern unsigned long _XSetLastRequestRead();    /* update dpy->last_request_read */
  509. extern int _XGetHostname();        /* get name of this machine */
  510. extern Screen *_XScreenOfWindow ();    /* get Screen pointer for window */
  511.  
  512. extern int (*XESetCreateGC(
  513. #if NeedFunctionPrototypes
  514.     Display*        /* display */,
  515.     int            /* extension */,
  516.     int (*) (
  517. #if NeedNestedPrototypes
  518.           Display*            /* display */,
  519.           GC            /* gc */,
  520.           XExtCodes*        /* codes */
  521. #endif
  522.         )        /* proc */
  523. #endif
  524. ))(
  525. #if NeedNestedPrototypes
  526.     Display*, GC, XExtCodes*
  527. #endif
  528. );
  529.  
  530. extern int (*XESetCopyGC(
  531. #if NeedFunctionPrototypes
  532.     Display*        /* display */,
  533.     int            /* extension */,
  534.     int (*) (
  535. #if NeedNestedPrototypes
  536.           Display*            /* display */,
  537.               GC            /* gc */,
  538.               XExtCodes*        /* codes */
  539. #endif
  540.             )        /* proc */          
  541. #endif
  542. ))(
  543. #if NeedNestedPrototypes
  544.     Display*, GC, XExtCodes*
  545. #endif
  546. );
  547.  
  548. extern int (*XESetFlushGC(
  549. #if NeedFunctionPrototypes
  550.     Display*        /* display */,
  551.     int            /* extenstion */,
  552.     int (*) (
  553. #if NeedNestedPrototypes
  554.           Display*            /* display */,
  555.               GC            /* gc */,
  556.               XExtCodes*        /* codes */
  557. #endif
  558.             )        /* proc */         
  559. #endif
  560. ))(
  561. #if NeedNestedPrototypes
  562.     Display*, GC, XExtCodes*
  563. #endif
  564. );
  565.  
  566. extern int (*XESetFreeGC(
  567. #if NeedFunctionPrototypes
  568.     Display*        /* display */,
  569.     int            /* extension */,
  570.     int (*) (
  571. #if NeedNestedPrototypes
  572.           Display*            /* display */,
  573.               GC            /* gc */,
  574.               XExtCodes*        /* codes */
  575. #endif
  576.             )        /* proc */         
  577. #endif
  578. ))(
  579. #if NeedNestedPrototypes
  580.     Display*, GC, XExtCodes*
  581. #endif
  582. );
  583.  
  584. extern int (*XESetCreateFont(
  585. #if NeedFunctionPrototypes
  586.     Display*        /* display */,
  587.     int            /* extension */,
  588.     int (*) (
  589. #if NeedNestedPrototypes
  590.           Display*            /* display */,
  591.               XFontStruct*        /* fs */,
  592.               XExtCodes*        /* codes */
  593. #endif
  594.             )        /* proc */    
  595. #endif
  596. ))(
  597. #if NeedNestedPrototypes
  598.     Display*, XFontStruct*, XExtCodes*
  599. #endif
  600. );
  601.  
  602. extern int (*XESetFreeFont(
  603. #if NeedFunctionPrototypes
  604.     Display*        /* display */,
  605.     int            /* extension */,
  606.     int (*) (
  607. #if NeedNestedPrototypes
  608.           Display*            /* display */,
  609.               XFontStruct*        /* fs */,
  610.               XExtCodes*        /* codes */
  611. #endif
  612.             )        /* proc */    
  613. #endif
  614. ))(
  615. #if NeedNestedPrototypes
  616.     Display*, XFontStruct*, XExtCodes*
  617. #endif
  618. ); 
  619.  
  620. extern int (*XESetCloseDisplay(
  621. #if NeedFunctionPrototypes
  622.     Display*        /* display */,
  623.     int            /* extension */,
  624.     int (*) (
  625. #if NeedNestedPrototypes
  626.           Display*            /* display */,
  627.               XExtCodes*        /* codes */
  628. #endif
  629.             )        /* proc */    
  630. #endif
  631. ))(
  632. #if NeedNestedPrototypes
  633.     Display*, XExtCodes*
  634. #endif
  635. );
  636.  
  637. extern int (*XESetError(
  638. #if NeedFunctionPrototypes
  639.     Display*        /* display */,
  640.     int            /* extension */,
  641.     int (*) (
  642. #if NeedNestedPrototypes
  643.           Display*            /* display */,
  644.               xError*            /* err */,
  645.               XExtCodes*        /* codes */,
  646.               int*            /* ret_code */
  647. #endif
  648.             )        /* proc */    
  649. #endif
  650. ))(
  651. #if NeedNestedPrototypes
  652.     Display*, xError*, XExtCodes*, int*
  653. #endif
  654. );
  655.  
  656. extern char* (*XESetErrorString(
  657. #if NeedFunctionPrototypes
  658.     Display*        /* display */,
  659.     int            /* extension */,
  660.     char* (*) (
  661. #if NeedNestedPrototypes
  662.             Display*        /* display */,
  663.                 int            /* code */,
  664.                 XExtCodes*        /* codes */,
  665.                 char*            /* buffer */,
  666.                 int            /* nbytes */
  667. #endif
  668.               )        /* proc */           
  669. #endif
  670. ))(
  671. #if NeedNestedPrototypes
  672.     Display*, int, XExtCodes*, char*, int
  673. #endif
  674. );
  675.  
  676. extern void (*XESetPrintErrorValues (
  677. #if NeedFunctionPrototypes
  678.     Display*        /* display */,
  679.     int            /* extension */,
  680.     void (*)(
  681. #if NeedNestedPrototypes
  682.           Display*            /* display */,
  683.           XErrorEvent*        /* ev */,
  684.           void*            /* fp */
  685. #endif
  686.          )        /* proc */
  687. #endif
  688. ))(
  689. #if NeedNestedPrototypes
  690.     Display*, XErrorEvent*, void*
  691. #endif
  692. );
  693.  
  694. extern int (*XESetWireToEvent(
  695. #if NeedFunctionPrototypes
  696.     Display*        /* display */,
  697.     int            /* event_number */,
  698.     Bool (*) (
  699. #if NeedNestedPrototypes
  700.            Display*            /* display */,
  701.                XEvent*            /* re */,
  702.                xEvent*            /* event */
  703. #endif
  704.              )        /* proc */    
  705. #endif
  706. ))(
  707. #if NeedNestedPrototypes
  708.     Display*, XEvent*, xEvent*
  709. #endif
  710. );
  711.  
  712. extern Status (*XESetEventToWire(
  713. #if NeedFunctionPrototypes
  714.     Display*        /* display */,
  715.     int            /* event_number */,
  716.     int (*) (
  717. #if NeedNestedPrototypes
  718.           Display*            /* display */,
  719.               XEvent*            /* re */,
  720.               xEvent*            /* event */
  721. #endif
  722.             )        /* proc */   
  723. #endif
  724. ))(
  725. #if NeedNestedPrototypes
  726.     Display*, XEvent*, xEvent*
  727. #endif
  728. );
  729.  
  730. extern Status (*XESetWireToError(
  731. #if NeedFunctionPrototypes
  732.     Display*        /* display */,
  733.     int            /* error_number */,
  734.     Bool (*) (
  735. #if NeedNestedPrototypes
  736.            Display*            /* display */,
  737.            XErrorEvent*        /* he */,
  738.            xError*            /* we */
  739. #endif
  740.             )        /* proc */   
  741. #endif
  742. ))(
  743. #if NeedNestedPrototypes
  744.     Display*, XErrorEvent*, xError*
  745. #endif
  746. );
  747.  
  748. _XFUNCPROTOEND
  749.